package com.city.domain.economic;

import javax.persistence.*;
import java.util.Objects;

/**
 * @deprecation: 单位安全管理机构
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
@Entity
@Table(name = "enterprise_umagency", schema = "city", catalog = "")
public class EnterpriseUmagency {
    private int id;//主键
    private String name;//机构名称
    private int number;//机构人数
    private int temporary;//兼职安全管理人员人数
    private int formal;//专职安全管理人员人数
    private String email;//邮箱
    private String officePhone;//办公电话
    private String dutyPhone;//值班电话
    private int mpersonId;//机构负责人编号,与基本人员信息表中对应
    private String mpersonName;//安全管理机构负责人姓名
    private String mpersonPost;//安全管理机构负责人兼任职务
    private String mpersonTitle;//安全管理机构负责人职称
    private String mpersonTellphone;//安全管理机构负责人手机号
    private String mpersonOfficephone;//安全管理机构负责人办公电话

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "number")
    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    @Basic
    @Column(name = "temporary")
    public int getTemporary() {
        return temporary;
    }

    public void setTemporary(int temporary) {
        this.temporary = temporary;
    }

    @Basic
    @Column(name = "formal")
    public int getFormal() {
        return formal;
    }

    public void setFormal(int formal) {
        this.formal = formal;
    }

    @Basic
    @Column(name = "email")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Basic
    @Column(name = "office_phone")
    public String getOfficePhone() {
        return officePhone;
    }

    public void setOfficePhone(String officePhone) {
        this.officePhone = officePhone;
    }

    @Basic
    @Column(name = "duty_phone")
    public String getDutyPhone() {
        return dutyPhone;
    }

    public void setDutyPhone(String dutyPhone) {
        this.dutyPhone = dutyPhone;
    }

    @Basic
    @Column(name = "mperson_id")
    public int getMpersonId() {
        return mpersonId;
    }

    public void setMpersonId(int mpersonId) {
        this.mpersonId = mpersonId;
    }

    @Basic
    @Column(name = "mperson_name")
    public String getMpersonName() {
        return mpersonName;
    }

    public void setMpersonName(String mpersonName) {
        this.mpersonName = mpersonName;
    }

    @Basic
    @Column(name = "mperson_post")
    public String getMpersonPost() {
        return mpersonPost;
    }

    public void setMpersonPost(String mpersonPost) {
        this.mpersonPost = mpersonPost;
    }

    @Basic
    @Column(name = "mperson_title")
    public String getMpersonTitle() {
        return mpersonTitle;
    }

    public void setMpersonTitle(String mpersonTitle) {
        this.mpersonTitle = mpersonTitle;
    }

    @Basic
    @Column(name = "mperson_tellphone")
    public String getMpersonTellphone() {
        return mpersonTellphone;
    }

    public void setMpersonTellphone(String mpersonTellphone) {
        this.mpersonTellphone = mpersonTellphone;
    }

    @Basic
    @Column(name = "mperson_officephone")
    public String getMpersonOfficephone() {
        return mpersonOfficephone;
    }

    public void setMpersonOfficephone(String mpersonOfficephone) {
        this.mpersonOfficephone = mpersonOfficephone;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        EnterpriseUmagency that = (EnterpriseUmagency) o;
        return id == that.id &&
                number == that.number &&
                temporary == that.temporary &&
                formal == that.formal &&
                mpersonId == that.mpersonId &&
                Objects.equals(name, that.name) &&
                Objects.equals(email, that.email) &&
                Objects.equals(officePhone, that.officePhone) &&
                Objects.equals(dutyPhone, that.dutyPhone) &&
                Objects.equals(mpersonName, that.mpersonName) &&
                Objects.equals(mpersonPost, that.mpersonPost) &&
                Objects.equals(mpersonTitle, that.mpersonTitle) &&
                Objects.equals(mpersonTellphone, that.mpersonTellphone) &&
                Objects.equals(mpersonOfficephone, that.mpersonOfficephone);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, name, number, temporary, formal, email, officePhone, dutyPhone, mpersonId, mpersonName, mpersonPost, mpersonTitle, mpersonTellphone, mpersonOfficephone);
    }
}
